﻿<UserControl x:Class="XWord.GUI.Views.Fundamental.EtymaWordListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:cal="http://www.caliburnproject.org"
             xmlns:inf="http://www.grandsys.com/luna"
             xmlns:info="http://schemas.xword.com/winfx/xaml/info"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <TextBlock Text="词根"/>
            <TextBlock Text="{Binding SelectedItem.Name,Source={cal:Resolve Key=EtymaLibraryExplorerPresenter}}"/>
            <TextBlock Text="词根含义"/>
            <TextBlock Text="{Binding SelectedItem.Comment,Source={cal:Resolve Key=EtymaLibraryExplorerPresenter}}"/>
            <TextBlock Text="词根相关单词"/>
        </StackPanel>
        
        <ListView Grid.Row="1" ItemsSource="{Binding BaseWordExplain}">
            <ListView.View>
                <GridView AllowsColumnReorder="true">
                    <GridViewColumn Header="单词">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Key}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="音标" >
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Value[Pron],StringFormat={}[{0}]}" Foreground="#FF009900" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="中文" >
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Value[Comment]}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>

            </ListView.View>

        </ListView>
    </Grid>
</UserControl>
